import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.junit.Test;

/**
 * 表映射
 * 
 * @author DELL
 *
 */
public class TableMap {

  @Test
  public void  testTableMap() {
    Configuration configuration = new AnnotationConfiguration().configure();   
    SchemaExport sexport = new SchemaExport(configuration);  
    sexport.setFormat(true);
    sexport.setDelimiter(";");  
    sexport.setOutputFile("D:\\auto.sql");  
    sexport.create(true, true);  
  }

}
